using UnityEngine;

namespace skeleton
{
    public class AttackState : State
    {
        [SerializeField] float CD;
        public float range;

        float lastTime;

        // ========================================================================

        public override bool Check() => Time.time >= lastTime + CD;

        public override void Enter()
        {
            base.Enter();

            skeleton.ResetVelocity();
        }

        public override void Exit()
        {
            base.Exit();

            lastTime = Time.time;
        }
    }
}